#ID:2115070127
#Name:寻俊凯
###problem1


def y(a,b):   
    return (4*a**(1/3)-b**2)/(5+(a/b))

###end

###problem2

a,n =map(int, input().split( ))
s=0
sum1=1
for i in range(1,n+1):
    s=a*10+i
    sum1=sum1*s
print(sum1)


###end


###problem3

import re
str_1=''
list_1=[]
list_2=[]
dict_1={}
with open("a.txt",'r') as f:
    for i in f:
        str_1+=i
        list_1=re.findall(r'[0-9]+',str_1)
for i in list_1:
    if i in dict_1:
        dict_1[i]+=1
    else:
        dict_1[i]=1
list_2=sorted(dict_1,key=lambda x:dict_1[x],reverse=True)
    
with open("b.txt", 'w') as f2:
    for i in list_2[:9]:
        f2.write(i+' ')


###end


###problem4

def convert(path,string):
     res = {}
     list_1 = []
     with open(path, 'r') as f:
         for i in f:
             list_1.append(i.strip().split(":"))
         print(list_1)
         for i in list_1:
             res[i[0]] = i[1]
         print(res)
         print(list_1)
     for i in string:
         if i not in res:
             print(i, end='')
         else:
             print(res[i], end='')
###end


###problem5
def my_yield(n):
    i = 0
    if n==1:
        while True:
            d = chr(97+i)
            print(d)
            if d =='z':
                break
            i+=1
    else:
        while True:
            d = chr(97+25+i)
            print(d)
            if d =='a':
                break
            i-=1
print(my_yield(input('请输入1或者-1：')))


###end

###problem6


###end